<?python
    from turbogears import identity
    from mnemoply import model
?>
<span xmlns:py="http://genshi.edgewall.org/">
    <table>
        <thead>
        <tr>
            <th>Coupon</th>
        </tr>
        </thead>

        <tbody>
        <tr py:for="c in model.Coupon.selectBy(temporaryPaymentRecord=obj)">
            <td><a href="/Coupon/${c.id}/">${c.title}</a></td>
        </tr>
        </tbody>
    </table>

    <hr />

    <span py:if="identity.has_any_permission('dba', 'Coupon/edit') and obj.payment > 0">${ET(tab.add_form())}</span>
</span>
